import java.util.Scanner;

public class Test4 {
    public static void print(int n){
        while(n>10){
            print(n/10);
            break;
        }
        System.out.print(n%10+" ");
        return;
    }
    public static int fun(int n){

        if(n<10){
            return n;
        }
    return n%10+fun(n/10);

    }

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
       print(n);


    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int a=fun(n);
        System.out.println(a);

    }
}
